CherryPicked: [4.21] eus upgrade alignment#5169
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (4)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features: 🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Container Operations
Cherry-pick Operations
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
AI Features
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
|
SiboWang1997 can not be added as reviewer. Reviews may only be requested from collaborators. One or more of the users or teams you specified is not a collaborator of the RedHatQE/openshift-virtualization-tests repository.: 422 {"message": "Reviews may only be requested from collaborators. One or more of the users or teams you specified is not a collaborator of the RedHatQE/openshift-virtualization-tests repository.", "documentation_url": "https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request", "status": "422"} |
Signed-off-by: Harel Meir <hmeir@redhat.com>
9f48b6d to
dd9cd42
Compare
|
SiboWang1997 can not be added as reviewer. Reviews may only be requested from collaborators. One or more of the users or teams you specified is not a collaborator of the RedHatQE/openshift-virtualization-tests repository.: 422 {"message": "Reviews may only be requested from collaborators. One or more of the users or teams you specified is not a collaborator of the RedHatQE/openshift-virtualization-tests repository.", "documentation_url": "https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request", "status": "422"} |
|
/retest all Auto-triggered: Files in this PR were modified by merged PR #5228. Overlapping filestests/conftest.py |
|
/verified |
Test execution plan request detailsCRITICAL: You MUST post an inline review comment on the first changed line of the first file. As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan. Analysis Requirements:
Output rules: Your deliverable: Test Execution Plan
Use these formats:
Real test commands (MANDATORY when changes affect session/runtime code): When the affected code runs at session/collection time (conftest fixtures, pytest plugins,
Example output for a session-startup fix: Guidelines:
Hardware-Related Checks (SR-IOV, GPU, DPDK): When PR modifies fixtures for hardware-specific resources:
CRITICAL WORKFLOW COMPLETION RULES: When responding to this test execution plan request, you MUST follow these rules EXACTLY:
ABSOLUTE PROHIBITIONS (violating these creates empty/meaningless reviews):
Remember: The pull request review is visible to users. Additional comments are redundant noise. CRITICAL — Verification rules for smoke and gating decisions: |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== PR `#5169` changed files ==="
gh pr view 5169 --repo RedHatQE/openshift-virtualization-tests --json files --jq '.files[].path'
echo ""
echo "=== PR diff (unified=0 for symbol identification) ==="
gh pr diff 5169 --repo RedHatQE/openshift-virtualization-testsLength of output: 35418 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== Callers of wait_for_automatic_vm_migrations ==="
rg -n "wait_for_automatic_vm_migrations" tests/ --type py -A2 -B2
echo ""
echo "=== Callers of vms_auto_migration_with_status_success ==="
rg -n "vms_auto_migration_with_status_success" tests/ --type py -A2 -B2
echo ""
echo "=== Callers of get_workload_update_migrations_list ==="
rg -n "get_workload_update_migrations_list" tests/ --type py -A2 -B2
echo ""
echo "=== Callers of wait_for_mcp_update_completion (tests/) ==="
rg -n "wait_for_mcp_update_completion" tests/ --type py -A2 -B2
echo ""
echo "=== Callers of wait_for_mcp_update_end (tests/) ==="
rg -n "wait_for_mcp_update_end" tests/ --type py -A2 -B2
echo ""
echo "=== Usages of eus_target_cnv_version fixture ==="
rg -n "eus_target_cnv_version" tests/ --type py -A2 -B2
echo ""
echo "=== Usages of eus_hco_target_csv_name fixture ==="
rg -n "eus_hco_target_csv_name" tests/ --type py -A2 -B2
echo ""
echo "=== Usages of csv_after_upgrade fixture ==="
rg -n "csv_after_upgrade" tests/ --type py -A2 -B2
echo ""
echo "=== Smoke-marked test files ==="
rg -l "`@pytest.mark.smoke`" tests/ --type py
echo ""
echo "=== Gating-marked test files ==="
rg -l "`@pytest.mark.gating`" tests/ --type py
echo ""
echo "=== Smoke/gating markers in virt/upgrade ==="
rg -n "`@pytest.mark.smoke`\|`@pytest.mark.gating`\|`@pytest.mark.eus_upgrade`\|`@pytest.mark.product_upgrade_test`" tests/virt/upgrade/ tests/install_upgrade_operators/product_upgrade/ --type py -A2 -B2Length of output: 7341 🏁 Script executed: #!/bin/bash
set -uo pipefail
echo "=== Smoke-marked test files ==="
rg -l "`@pytest.mark.smoke`" tests/ --type py || echo "NONE"
echo ""
echo "=== Gating-marked test files ==="
rg -l "`@pytest.mark.gating`" tests/ --type py || echo "NONE"
echo ""
echo "=== eus_target_cnv_version usage ==="
rg -n "eus_target_cnv_version" tests/ --type py || echo "NONE"
echo ""
echo "=== eus_hco_target_csv_name usage ==="
rg -n "eus_hco_target_csv_name" tests/ --type py || echo "NONE"
echo ""
echo "=== csv_after_upgrade usage ==="
rg -n "csv_after_upgrade" tests/ --type py || echo "NONE"
echo ""
echo "=== Markers in virt/upgrade test files ==="
rg -n "pytest.mark" tests/virt/upgrade/ --type py || echo "NONE"
echo ""
echo "=== Markers in product_upgrade test files ==="
rg -n "pytest.mark" tests/install_upgrade_operators/product_upgrade/ --type py || echo "NONE"
echo ""
echo "=== First changed line info: product_upgrade/conftest.py line range ==="
head -30 tests/install_upgrade_operators/product_upgrade/conftest.pyLength of output: 17696 🏁 Script executed: #!/bin/bash
set -uo pipefail
# Get the PR commit SHA for inline review comment
gh pr view 5169 --repo RedHatQE/openshift-virtualization-tests --json headRefOid --jq '.headRefOid'
echo ""
echo "=== First changed line in conftest.py (line 25 area) ==="
# The diff shows +from packaging.version import Version at line 25 (after line 22 context)
# Let's confirm exact line number
grep -n "from packaging.version import Version" conftest.py || echo "not found at root level"
echo ""
echo "=== Check first line number of the diff hunk in conftest.py ==="
# From diff: @@ -22,6 +22,7 @@ means line 22 context, the addition is at line 25
# Confirm with actual file
sed -n '22,27p' conftest.pyLength of output: 1292 🏁 Script executed: #!/bin/bash
set -euo pipefail
COMMIT_SHA="dd9cd42ebd62403fe8372d2703d779aa3657ea65"
REPO="RedHatQE/openshift-virtualization-tests"
PR_NUMBER=5169
PLAN_BODY='**Test Execution Plan**
**Run smoke tests: False**
No smoke-marked test file is in the affected set. Modified EUS/upgrade symbols are isolated to upgrade-lane fixtures and utilities.
**Run gating tests: True**
Dependency paths:
- `tests/virt/upgrade/test_upgrade_virt.py` **(gating)** → `unupdated_vmi_pods_names` fixture (`tests/virt/upgrade/conftest.py:179`) → `wait_for_automatic_vm_migrations(vm_list=…)` in `tests/virt/upgrade/utils.py` (signature changed: `admin_client` param removed)
- `tests/virt/upgrade/test_upgrade_virt.py` **(gating)** → `csv_after_upgrade` fixture (`tests/virt/upgrade/conftest.py:381`) → `eus_hco_target_csv_name` dependency removed; now relies solely on `hco_target_csv_name`
**Affected tests to run**
| Path | Marker | Reason |
|------|--------|--------|
| `tests/install_upgrade_operators/product_upgrade/test_eus_upgrade.py` | `eus_upgrade` | Core EUS test; `eus_cnv_upgrade_path` fixture fully reworked, `eus_created_target_hco_csv` → `created_target_hco_csv` |
| `tests/install_upgrade_operators/product_upgrade/test_upgrade_iuo.py` | `eus_upgrade` | Uses EUS conftest fixtures (reworked) |
| `tests/virt/upgrade/test_upgrade_virt.py` | `gating` | `csv_after_upgrade` + `unupdated_vmi_pods_names` fixture signatures changed |
| `tests/install_upgrade_operators/product_upgrade/test_upgrade.py` | `gating` | `wait_for_mcp_update_completion` now accepts `timeout`; EUS conftest in same session scope |
**Real tests (cluster required)**
Root `conftest.py` `pytest_cmdline_main` now runs even-minor-version validation and enforces `--cnv-version`/`--cnv-image` for EUS at session startup.
Error path (odd minor version guard):Length of output: 2224 🏁 Script executed: #!/bin/bash
set -euo pipefail
COMMIT_SHA="dd9cd42ebd62403fe8372d2703d779aa3657ea65"
REPO="RedHatQE/openshift-virtualization-tests"
PR_NUMBER=5169
cat > /tmp/plan_body.txt << 'PLAN_EOF'
**Test Execution Plan**
**Run smoke tests: False**
No smoke-marked test file is in the affected set. Modified EUS/upgrade symbols are isolated to upgrade-lane fixtures and utilities.
**Run gating tests: True**
Dependency paths:
- `tests/virt/upgrade/test_upgrade_virt.py` **(gating)** → `unupdated_vmi_pods_names` fixture (`tests/virt/upgrade/conftest.py:179`) → `wait_for_automatic_vm_migrations(vm_list=…)` in `tests/virt/upgrade/utils.py` (signature changed: `admin_client` param removed)
- `tests/virt/upgrade/test_upgrade_virt.py` **(gating)** → `csv_after_upgrade` fixture (`tests/virt/upgrade/conftest.py:381`) → `eus_hco_target_csv_name` dependency removed; now relies solely on `hco_target_csv_name`
**Affected tests to run**
| Path | Marker | Reason |
|------|--------|--------|
| `tests/install_upgrade_operators/product_upgrade/test_eus_upgrade.py` | `eus_upgrade` | Core EUS test; `eus_cnv_upgrade_path` fixture fully reworked, `eus_created_target_hco_csv` replaced with `created_target_hco_csv` |
| `tests/install_upgrade_operators/product_upgrade/test_upgrade_iuo.py` | `eus_upgrade` | Uses reworked EUS conftest fixtures |
| `tests/virt/upgrade/test_upgrade_virt.py` | `gating` | `csv_after_upgrade` + `unupdated_vmi_pods_names` fixture signatures changed |
| `tests/install_upgrade_operators/product_upgrade/test_upgrade.py` | `gating` | `wait_for_mcp_update_completion` now accepts `timeout`; EUS conftest in same session scope |
**Real tests (cluster required)**
Root `conftest.py` `pytest_cmdline_main` now enforces even-minor-version validation and mandatory `--cnv-version`/`--cnv-image` for EUS at session startup.
Error path (odd minor version guard):Length of output: 2102 🏁 Script executed: #!/bin/bash
set -euo pipefail
python3 << 'PYEOF'
import json, subprocess
body = (
"**Test Execution Plan**\n\n"
"**Run smoke tests: False**\n"
"No smoke-marked test file is in the affected set. Modified EUS/upgrade symbols are isolated to upgrade-lane fixtures and utilities.\n\n"
"**Run gating tests: True**\n\n"
"Dependency paths:\n"
"- `tests/virt/upgrade/test_upgrade_virt.py` **(gating)** \u2192 `unupdated_vmi_pods_names` fixture (`tests/virt/upgrade/conftest.py:179`) \u2192 `wait_for_automatic_vm_migrations(vm_list=\u2026)` in `tests/virt/upgrade/utils.py` (signature changed: `admin_client` param removed)\n"
"- `tests/virt/upgrade/test_upgrade_virt.py` **(gating)** \u2192 `csv_after_upgrade` fixture (`tests/virt/upgrade/conftest.py:381`) \u2192 `eus_hco_target_csv_name` dependency removed; now relies solely on `hco_target_csv_name`\n\n"
"**Affected tests to run**\n\n"
"| Path | Marker | Reason |\n"
"|------|--------|--------|\n"
"| `tests/install_upgrade_operators/product_upgrade/test_eus_upgrade.py` | `eus_upgrade` | Core EUS test; `eus_cnv_upgrade_path` fixture fully reworked, `eus_created_target_hco_csv` replaced with `created_target_hco_csv` |\n"
"| `tests/install_upgrade_operators/product_upgrade/test_upgrade_iuo.py` | `eus_upgrade` | Uses reworked EUS conftest fixtures |\n"
"| `tests/virt/upgrade/test_upgrade_virt.py` | `gating` | `csv_after_upgrade` + `unupdated_vmi_pods_names` fixture signatures changed |\n"
"| `tests/install_upgrade_operators/product_upgrade/test_upgrade.py` | `gating` | `wait_for_mcp_update_completion` now accepts `timeout`; EUS conftest in same session scope |\n\n"
"**Real tests (cluster required)**\n\n"
"Root `conftest.py` `pytest_cmdline_main` now enforces even-minor-version validation and mandatory `--cnv-version`/`--cnv-image` for EUS at session startup.\n\n"
"Error path (odd minor version guard):\n"
"```\n"
"pytest tests/install_upgrade_operators/product_upgrade/test_eus_upgrade.py \\\n"
" --upgrade=eus --cnv-version=4.21.0 --cnv-image=NA --eus-ocp-images=NA,NA --collect-only\n"
"```\n"
"Expected: `ValueError: EUS target version 4.21.0 must have an even minor version`\n\n"
"Happy path (even minor \u2014 regression):\n"
"```\n"
"pytest tests/install_upgrade_operators/product_upgrade/test_eus_upgrade.py \\\n"
" --upgrade=eus --cnv-version=4.22.0 --cnv-image=NA --eus-ocp-images=NA,NA --collect-only\n"
"```\n"
"Expected: collection completes without error\n\n"
"Virt upgrade fixture regression (`admin_client` removal):\n"
"```\n"
"pytest tests/virt/upgrade/test_upgrade_virt.py -m eus_upgrade \\\n"
" --upgrade=eus --cnv-version=<target> --cnv-image=<image> --eus-ocp-images=<img1>,<img2> --collect-only\n"
"```\n"
"Expected: fixtures resolve without unexpected `admin_client` argument errors\n"
)
payload = {
"commit_id": "dd9cd42ebd62403fe8372d2703d779aa3657ea65",
"event": "COMMENT",
"body": "",
"comments": [
{
"path": "conftest.py",
"line": 25,
"side": "RIGHT",
"body": body
}
]
}
with open("/tmp/review_payload.json", "w") as f:
json.dump(payload, f)
result = subprocess.run(
["gh", "api", "--method", "POST",
"/repos/RedHatQE/openshift-virtualization-tests/pulls/5169/reviews",
"--input", "/tmp/review_payload.json"],
capture_output=True, text=True
)
print("STDOUT:", result.stdout[:800])
print("STDERR:", result.stderr[:500])
print("RC:", result.returncode)
PYEOFLength of output: 4561 |
|
/retest all Auto-triggered: Files in this PR were modified by merged PR #5332. Overlapping filesconftest.py |
|
/approve /lgtm |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:cnv-4.21 published |
Short description:
Cherry-pick from #5055
More details:
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for reviewer:
jira-ticket: